﻿using System;
using UnityEngine;

namespace UniRx.Triggers
{
	// Token: 0x02000435 RID: 1077
	[DisallowMultipleComponent]
	public class ObservableLateUpdateTrigger : ObservableTriggerBase
	{
		// Token: 0x06001699 RID: 5785 RVA: 0x00061FAC File Offset: 0x000603AC
		private void LateUpdate()
		{
			if (this.lateUpdate != null)
			{
				this.lateUpdate.OnNext(Unit.Default);
			}
		}

		// Token: 0x0600169A RID: 5786 RVA: 0x00061FCC File Offset: 0x000603CC
		public IObservable<Unit> LateUpdateAsObservable()
		{
			Subject<Unit> result;
			if ((result = this.lateUpdate) == null)
			{
				result = (this.lateUpdate = new Subject<Unit>());
			}
			return result;
		}

		// Token: 0x0600169B RID: 5787 RVA: 0x00061FF4 File Offset: 0x000603F4
		protected override void RaiseOnCompletedOnDestroy()
		{
			if (this.lateUpdate != null)
			{
				this.lateUpdate.OnCompleted();
			}
		}

		// Token: 0x04000CAF RID: 3247
		private Subject<Unit> lateUpdate;
	}
}
